package com.cyh.testdesignpattern.visitor;

public abstract class Person {
    private String name;

    public Person(String name) {
        this.name = name;
    }

    //提供一个方法，让访问者能够访问
    public abstract void accept(Action action);

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
